﻿<!DOCTYPE html>
<html lang="zh-cn" data-name="泰信汽车我的所有预约" data-qqkey="" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>我的预约</title>
    <meta name="format-detection" content="telephone=no, address=no">
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="full-screen" content="yes">
    <meta name="x5-fullscreen" content="true">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
    <meta name="keywords" content=""/>
    <meta name="description" content=""/>
    <link rel="shortcut icon" href="/static/copy/picture/atxx1bundbvtx1vbdvtbbtb2zvcbbb.jpg"/>
    <link rel="stylesheet" href="/static/copy/css/weui.css"/>
    <link rel="stylesheet" href="/static/copy/css/weui.min.css">
    <link rel="stylesheet" href="/static/copy/css/dayu.css"/>
    <script type="text/javascript" src="/static/copy/js/font_847198_ex5ae4gllv9.js"></script>
    <script src="/static/copy/js/jquery-weui.min.js"></script>
    <script type="text/javascript" src="/static/copy/js/jweixin-1.4.0.js"></script>
    <script type="text/javascript">
        if (navigator.appName == 'Microsoft Internet Explorer') {
            if (navigator.userAgent.indexOf("MSIE 5.0") > 0 || navigator.userAgent.indexOf("MSIE 6.0") > 0 || navigator.userAgent.indexOf("MSIE 7.0") > 0) {
                alert('您使用的 IE 浏览器版本过低, 推荐使用 Chrome 浏览器或 IE8 及以上版本浏览器.');
            }
        }
        window.sysinfo = {
            'uniacid': '17',
            'acid': '17',
            'siteroot': 'http://888.huipin.co/',
            'siteurl': 'http://888.huipin.co/app/index.php?i=17&c=entry&id=1&do=mydayu_yuyuepay&m=dayu_yuyuepay',
            'attachurl': 'http://888.huipin.co/attachment/',
            'attachurl_local': 'http://888.huipin.co/attachment/',
            'MODULE_URL': 'http://888.huipin.co/addons/dayu_yuyuepay/',
            'cookie': {'pre': '03ad_'}
        };

        // jssdk config 对象
        jssdkconfig = null || {};

        // 是否启用调试
        jssdkconfig.debug = false;

        jssdkconfig.jsApiList = [
            'checkJsApi',
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
            'onMenuShareWeibo',
            'hideMenuItems',
            'showMenuItems',
            'hideAllNonBaseMenuItem',
            'showAllNonBaseMenuItem',
            'translateVoice',
            'startRecord',
            'stopRecord',
            'onRecordEnd',
            'playVoice',
            'pauseVoice',
            'stopVoice',
            'uploadVoice',
            'downloadVoice',
            'chooseImage',
            'previewImage',
            'uploadImage',
            'downloadImage',
            'getNetworkType',
            'openLocation',
            'getLocation',
            'hideOptionMenu',
            'showOptionMenu',
            'closeWindow',
            'scanQRCode',
            'chooseWXPay',
            'openProductSpecificView',
            'addCard',
            'chooseCard',
            'openCard'
        ];

    </script>
    <script type="text/javascript">
        function _removeHTMLTag(str) {
            if (typeof str == 'string') {
                str = str.replace(/<script[^>]*?>[\s\S]*?<\/script>/g, '');
                str = str.replace(/<style[^>]*?>[\s\S]*?<\/style>/g, '');
                str = str.replace(/<\/?[^>]*>/g, '');
                str = str.replace(/\s+/g, '');
                str = str.replace(/&nbsp;/ig, '');
            }
            return str;
        }
    </script>
</head>
<body id="message" ontouchstart>
<div class="weui_tab" id="tab">
    <link rel="stylesheet" href="/static/copy/css/component.css"/>
    <nav class="cbp-spmenu cbp-spmenu-vertical cbp-spmenu-left" id="cbp-spmenu-s1">
        <h3><img class="weui_media_appmsg_thumb circle" src="/static/copy/picture/headimg_17.jpg"
                 style="width:35px;height:35px;margin-right:10px;">
            <small th:text="${session.user ne null?session.user.username:'游客'}"></small>
        </h3>
        <a href="/yuyue/options" class="middle">
            <svg class="icon f-white" aria-hidden="true">
                <use xlink:href="#icon-homepage"></use>
            </svg>
            首页</a>
        <a href="/yuyue/count">
            <svg class="icon f-white" aria-hidden="true">
                <use xlink:href="#icon-createtask"></use>
            </svg>
            预约记录</a>
        <a href="/yuyue/userInfo">
            <svg class="icon f-white" aria-hidden="true">
                <use xlink:href="#icon-member"></use>
            </svg>
            用户中心</a>
    </nav>
    <div class="container">
        <div id="pop_share" class="new-comment-content hide"></div>
        <script type="text/javascript" src="/static/copy/js/dropload.min.js"></script>
        <!--预约的个数-->
        <script type="text/javascript" th:inline="javascript">
            $(function () {
//                修改数量
                console.log('8888');
                var count = "[[${count}]]";
                var rhtml = '<span class="weui-badge" style="position: absolute;top: 2px;right: 2px;">'+count+'</span>';
                $('.weui_bar_item_on').append(rhtml);
            });
        </script>
        <style>
            a {
                color: #333;
            }

            .weui_tabbar_item {
                position: relative;
            }

            .weui_tabbar_item svg {
                vertical-align: middle;
            }

            .weui_media_appmsg_thumb {
                color: #e3f2fd;
            }

            .weui_media_bd .weui_media_desc {
                line-height: 20px;
            }

            .dayu-badge {
                padding: 5px 8px;
            }
        </style>
        <div class="weui-header bg-blue">
            <div class="weui-header-left">
                <svg class="icon" aria-hidden="true">
                    <use xlink:href="#icon-menu"></use>
                </svg>
                <span id="showLeftPush">菜单</span>
            </div>
            <div class="weui-header-title">
                我的预约
            </div>
            <div class="weui-header-right">

            </div>
        </div>
        <div class="weui_tab_bd">
            <div class="order">
            </div>
        </div>
        <!--数据结合 数据经典解析-->
        <script id="tpl" type="text/html">
            <% for(var i in list) { %>
            <div class="weui_panel weui_panel_access"
                 onclick="location.href='/yuyue/details?yuyueId='+'<%=list[i].id%>'">
                <div class="weui_panel_bd">
                    <div class="weui_media_box weui_media_appmsg">
                        <div class="weui_media_hd">
                            <span class="weui_media_appmsg_thumb"><img class="weui_media_appmsg_thumb circle"
                                                                       src="#" alt=""></span>
                        </div>
                        <div class="weui_media_bd">
                            <h4 class="weui_media_title">
                                <%=list[i].realname%>
                                <small><%=list[i].mobile%></small>
                            </h4>
                            <p class="weui_media_desc dayu-gray">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-flow_chart"></use>
                                </svg>
                                服务项目: <%=list[i].serverName%> <%=list[i].num==null?"":list[i].num%>
                            </p>
                            <p class="weui_media_desc dayu-gray">
                                <svg class="icon" aria-hidden="true">
                                    <use xlink:href="#icon-clock1"></use>
                                </svg>
                                预约时间: <%=list[i].restime%>
                            </p>
                        </div>
                    </div>
                    <div class="weui_cell">
                        <div class="weui_cell_hd f-orange">
                            <svg class="icon f16" aria-hidden="true">
                                <use xlink:href="#icon-renminbi">
                                </use>
                            </svg>
                            <%=list[i].price%>
                        </div>
                        <div class="weui_cell_bd weui_cell_primary tright">
                            <%=list[i].paytype==null?"":list[i].paytype%>
                            <span class="dayu-badge bg-gray">
                                <%=list[i].paystatus==1?"已付款":"未付款"%>
                            </span>
                            <span class="dayu-badge weui_btn_default">
                                <%=list[i].process==0?"待受理":list[i].process==1?"受理中":list[i].process==2?"已取消":list[i].process==3?"已完成":"异常"%>
                            </span>
                        </div>
                    </div>
                </div>
            </div>
            <% } %>
        </script>
        <!--$(".weui_media_box").removeClass("actvd");-->
        <div class="tab-bottom">
            <div class="weui_tabbar">
                <a href="/yuyue/list?process=-1"
                   th:class="${process eq -1 ?'weui_tabbar_item weui_bar_item_on':'weui_tabbar_item '}">
                    <div class="weui_tabbar_icon">
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-all"></use>
                        </svg>
                    </div>
                    <p class="weui_tabbar_label">全部</p>
                </a>
                <a href="/yuyue/list?process=0"
                   th:class="${process eq 0 ?'weui_tabbar_item weui_bar_item_on':'weui_tabbar_item '}">
                    <div class="weui_tabbar_icon">
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-time"></use>
                        </svg>
                    </div>
                    <p class="weui_tabbar_label">待受理</p>
                </a>
                <a href="/yuyue/list?process=1"
                   th:class="${process eq 1 ?'weui_tabbar_item weui_bar_item_on':'weui_tabbar_item '}">
                    <div class="weui_tabbar_icon">
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-service"></use>
                        </svg>
                    </div>
                    <p class="weui_tabbar_label">受理中</p>
                </a>
                <a href="/yuyue/list?process=2"
                   th:class="${process eq 2 ?'weui_tabbar_item weui_bar_item_on':'weui_tabbar_item '}">
                    <div class="weui_tabbar_icon">
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-close"></use>
                        </svg>
                    </div>
                    <p class="weui_tabbar_label">已取消</p>
                </a>
                <a href="/yuyue/list?process=3"
                   th:class="${process eq 3 ?'weui_tabbar_item weui_bar_item_on':'weui_tabbar_item '}">
                    <div class="weui_tabbar_icon">
                        <svg class="icon" aria-hidden="true">
                            <use xlink:href="#icon-check"></use>
                        </svg>
                    </div>
                    <p class="weui_tabbar_label">已完成</p>
                </a>
            </div>
        </div>

        <script th:inline="javascript">
            var process= "[[${process}]]";
            if(process=="null"){
                process=-1;
            }
            $(function () {
                var page = 0;
                var size = 10;
                var status = '';  //动态值
                $('.weui_tab_bd').dropload({
                    scrollArea: window,
                    autoLoad: true,//自动加载
                    domDown: {//上拉
                        domClass: 'dropload-down',
                        domRefresh: '<div class="dropload-refresh f15 "><i class="icon icon-20"></i>上拉加载更多</div>',
                        domLoad: '<div class="dropload-load f15"><span class="weui-loading"></span>正在加载中...</div>',
                        domNoData: '<div class="dropload-noData">没有更多订单了</div>'
                    },
                    loadDownFn: function (me) {//加载更多
                        page++;
                        //		window.history.pushState(null, document.title, window.location.href);	//加载记录页面
                        var result = '';
                        $.ajax({
                            type: 'GET',
                            url: "/yuyue/listSuccess",
                            dataType: 'json',
                            data: {page: page, limit: size, process: process},
                            success: function (data) {
                                var arrLen = data.list.length;
                                if (arrLen > 0) {
                                    var tplx = document.getElementById('tpl').innerHTML;
                                    var result = tpl(tplx, data);
                                } else {
                                    me.lock();
                                    me.noData();
                                }
                                setTimeout(function () {
                                    $('.order').append(result);
                                    me.resetload();
                                }, 500);
                            },
                            error: function (xhr, type) {
                                $.alert('Ajax error!');
                                console.log("Ajax error!");
//                                me.resetload();
                            }
                        });
                    }
                });
            });
        </script>
    </div>
</div>
<script type="text/javascript" src="/static/copy/js/classie.js"></script>
<script type="text/javascript">
    var menuLeft = document.getElementById('cbp-spmenu-s1'),
        showLeftPush = document.getElementById('showLeftPush'),
        showRightPush = document.getElementById('showRightPush'),
        pop_share = document.getElementById('pop_share'),
        body = document.body;

    showLeftPush.onclick = function () {
        classie.toggle(this, 'active');
        classie.toggle(body, 'cbp-spmenu-push-toright');
        classie.toggle(menuLeft, 'cbp-spmenu-open');
        disableOther('showLeftPush');
        $('#pop_share').fadeIn();
    };
    pop_share.onclick = function () {
        classie.toggle(body, 'cbp-spmenu-push-toright');
        classie.toggle(menuLeft, 'cbp-spmenu-open');
        disableOther('showLeftPush');
        $('#pop_share').addClass('hide');
        $('#pop_share').fadeOut();
    };

    function disableOther(button) {
        if (button !== 'showLeftPush') {
            classie.toggle(showLeftPush, 'disabled');
        }
    }
</script>
<script type="text/javascript">
    $(function () {
        wx.config(jssdkconfig);
        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
            wx.hideOptionMenu();
        });
    });

    function tomedia(src) {
        if (typeof src != 'string')
            return '';
        if (src.indexOf('http://') == 0 || src.indexOf('https://') == 0) {
            return src;
        } else if (src.indexOf('../addons') == 0 || src.indexOf('../attachment') == 0) {
            src = src.substr(3);
            return window.sysinfo.siteroot + src;
        } else if (src.indexOf('./resource') == 0) {
            src = src.substr(2);
            return window.sysinfo.siteroot + 'app/' + src;
        } else if (src.indexOf('images/') == 0) {
            return window.sysinfo.attachurl + src;
        }
    }
</script>
</body>
</html>
